The GNU Fortran compiler
========================

Introduction
------------

This is a port of the GNU Fortran compiler (version 0.5.25) for the 
Fortran 77 and 90 programming language dialects to the Acorn range of
ARM based machines, running under RISC OS. As such, this package is
covered by the FSF General Public License (see the files docs.COPYING
and docs.COPYINGLIB for details).

This port is © 1996, 1997, 1998, 1999, 2000, 2001 Nick Burrett

As with GNU programs, THERE IS NO WARRANTY OF ANY SORT

This compiler requires a minimum 3200Kb of free RAM for compilations.


Files
-----

This is a binary distribution only and consists of the following files:

  bin.f771          The Fortran compiler
  bin.g77           The Fortran compiler front end
  docs.g77          Fortran compiler instruction manual
  docs.g77-readme   This documentation
  gcc.o.libf2c      Fortran compiler runtime library

The compiler sources (about 47Mb) can be obtained from the sites listed at
the end of docs.!Intro.


Installation
------------

Before attempting to use GNU C, it should be noted that this distribution
will require the GCC compiler. If you do not have a copy of this, it can
be retrieved from
  http://hard-mofo.dsvr.net/gcc

GNU Fortran 0.5.25 also requires UnixLib 3.8.


Compiling Fortran source
------------------------

Fortran source files can be kept in either the 'for' or 'f' directories.

Fortran comes with an extra file called g77. g77 is a front end binary for
the Fortran compiler, and will automatically include the necessary run-time
library needed by Fortran whenever the compilation needs it.

Typing:
    gcc -c f.test
or  g77 -c f.test

will compile the Fortran file, test, into an AOF file and store it in the
'o' directory.

Typing:
  gcc f.test -o test -lf2c -Wl,-rescan

is equivalent to:
  g77 f.test -o test -Wl,-rescan

libf2c is the standard run-time library required by Fortran. Notice the
extra command line option '-Wl,-rescan'. This requests drlink to rescan
all libraries to try and resolve missing references. It is equivalent
to passing '-rescan' on the drlink command line.

All GNU compilers require the library gcc:o.libgcc to operate. So separate
compile and link operations must include this.


Error numbers
-------------

The fortran run-time library can return the following error numbers.

100	error in format
101	illegal unit number
102	formatted io not allowed
103	unformatted io not allowed
104	direct io not allowed
105	sequential io not allowed
106	can't backspace file
107	null file name
108	can't stat file
109	unit not connected
110	off end of record
111	truncation failed in endfile
112	incomprehensible list input
113	out of free space
114	unit not connected
115	read unexpected character
116	bad logical input field
117	bad variable type
118	bad namelist name
119	variable not in namelist
120	no end record
121	variable count incorrect
122	subscript for scalar variable
123	invalid array section
124	substring out of bounds
125	subscript out of bounds
126	can't read file
127	can't write file
128	'new' file exists
129	can't append to file
130	non-positive record number
131	I/O started while already doing I/O
132	Temporary file name (TMPDIR?) too long


In addition, the following UnixLib errors may be returned.

1	Operation not permitted
2	No such file or directory
3	No such process
4	Interrupted system call
5	Input/output error
6	No such device or address
7	Argument list too long
8	Exec format error
9	Bad file descriptor
10	No child processes
11	Resource deadlock avoided
12	Cannot allocate memory
13	Permission denied
14	Bad address
15	Block device required
16	Device busy
17	File exists
18	Invalid cross-device link
19	Operation not supported by device
20	Not a directory
21	Is a directory
22	Invalid argument
23	Too many open files in system
24	Too many open files
25	Inappropriate ioctl for device
26	Text file busy
27	File too large
28	No space left on device
29	Illegal seek
30	Read-only file system
31	Too many links
32	Broken pipe
33	Argument out of domain
34	Range error
35	Operation would block
36	Operation now in progress
37	Operation already in progress
38	Socket operation on non-socket
39	Destination address required
40	Message too long
41	Protocol wrong type for socket
42	Option not supported by protocol
43	Protocol not supported
44	Socket type not supported
45	Operation not supported
46	Protocol family not supported
47	Address family not supported by protocol family
48	Address already in use
49	Can't assign requested address
50	Network is down
51	Network unreachable
52	Network dropped connection on reset
53	Software caused connection abort
54	Connection reset by peer
55	No buffer space available
56	Socket is already connected
57	Socket is not connected
58	Can't send after socket shutdown
59	Too many references: can't splice
60	Connection timed out
61	Connection refused
62	Too many levels of symbolic links
63	File name too long
64	Host is down
65	Host unreachable
66	Directory not empty
67	Too many processes
68	Too many users
69	Disc quota exceeded
70	Stale NFS file handle
71	Too many levels of remote in path
72	RPC struct is bad
73	RPC version wrong
74	RPC program not available
75	RPC program version wrong
76	RPC bad procedure for program
77	No locks available
78	Function not implemented
79	Inappropriate file type or format
80	Authentication error
81	Need authenticator
82	Resource temporarily unavailable

